
<form class="well form-horizontal span8" action="<?php echo base_url() . "index.php/ciclo/actualizar" ?>" method="post">
    <legend>MODIFICAR DATOS DE LOS SEMESTRES ACADEMICOS</legend>

    <?php foreach ($ciclo as $i => $row) { ?>



        <div class="control-group">
            <label class="control-label" for="select03">CARRERAS</label>
            <div class="controls ">
                <select name="carrera" class="span3"
                        ONCHANGE="javascript:modificar(this.options[this.selectedIndex].value, '<?php echo (base_url()) . "index.php/ciclo/actualizar" ?>', '<?php echo ($opc) ?>', '<?php echo ($ide_cic) ?>');">
                            <?php
                            if ($ide_car == -1)
                                echo ("<option value='-1' selected>Seleccionar Carrera</option>");
                            foreach ($carrera as $i => $car) {
                                echo ("<option value='" . $car["ide_car"] . "'");
                                echo (($ide_car == $car["ide_car"] ? " selected" : "") . ">");
                                echo ($car["nombre_car"] . "</option>");
                            }
                            ?>
                </select>
                <?php if (isset($msj_error)) { ?>
                    <div class='MensajeError'>
                        <?php echo ($msj_error); ?>
                    </div>
                <?php } ?>

            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="select03">Lista de Mallas</label>
            <div class="controls ">
                <select id="select01"  name="pensum" class="span3">
                    <?php
                    if ($ide_car == -1)
                        echo ("<option value='-1' selected>Seleccionar Pensum</option>");
                    else
                        foreach ($pensum as $i => $pen) {
                            echo ("<option value='" . $pen["ide_pen"] . "'>");
                            echo ($pen["descripcion_pen"] . "-" . $pen["estado_pen"] . "</option>");
                        }
                    ?>

                </select>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="input03">C&oacute;digo del Semestre</label>
            <div class="controls">
                <input type="text" class="input-medium span1"  name="txtcod" value="<?php echo $row["codigo_cic"]; ?>">
                <li class="icon-asterisk"></li>
                <div class='MensajeError'>
                    <?php echo form_error('txtcod') ?>
                </div>

            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input03">Nombre del Semestre</label>
            <div class="controls">
                <input type="text" class="input-medium span3"  name="txtnombre" value="<?php echo $row["nombre_cic"]; ?>">
                <li class="icon-asterisk"></li>
                <div class='MensajeError'>
                    <?php echo form_error('txtnombre') ?>
                </div>

            </div>
        </div>

        <fieldset>
            <div class="control-group"> 
                <div class="controls">
                    <input type="hidden" name="ide_cic" value="<?php echo $row["ide_cic"]; ?>">
                    <input type="hidden"  name="txtopc" value="<?php echo $opc; ?>">

                </div>
            </div >
        </fieldset>

    <?php } ?>

    <div class="controls">
        <?php if ($opc == 'upd') { ?>
            <button type="submit" class="btn">Modificar Datos</button>

        <?php } else { ?>
            <button type="submit" class="btn">Eliminar Datos</button>
        <?php } ?>
        <a href="<?php echo base_url() . "index.php/ciclo/inicio" ?>">
            <img src="<?php echo base_url(); ?>commons/images/boton_volver.gif"></a>

    </div> 


</form>


